-
Notifications
You must be signed in to change notification settings - Fork 55
fix: init showingDesktop for smart Hide. #1165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR ensures that the Sequence diagram for initializing m_showingDesktop from KWin D-BussequenceDiagram
participant X11DockHelper
participant KWin (D-Bus)
X11DockHelper->>KWin (D-Bus): Query property "showingDesktop"
KWin (D-Bus)-->>X11DockHelper: Return current value (bool)
X11DockHelper->>X11DockHelper: Set m_showingDesktop = value
Class diagram for updated X11DockHelper initializationclassDiagram
class X11DockHelper {
- m_showingDesktop: bool
+ setupKWinDBusConnection()
}
class QDBusInterface
class QDBusConnection
X11DockHelper ..> QDBusInterface : uses
X11DockHelper ..> QDBusConnection : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as title. Logs:
b56f1a5 to
71878a9
Compare
deepin pr auto review关键摘要:
是否建议立即修改:
建议的修改: void X11DockHelper::setupKWinDBusConnection()
{
// 连接到 KWin 的 D-Bus 接口监听 showingDesktopChanged 信号
QDBusInterface kwin("org.kde.KWin", "/KWin", "org.kde.KWin", QDBusConnection::sessionBus());
if (kwin.isValid()) {
// 获取 showingDesktop 属性,并处理可能的异常
QDBusReply<QVariant> reply = kwin.property("showingDesktop");
if (reply.isValid()) {
m_showingDesktop = reply.value().toBool();
} else {
qWarning() << "Failed to get showingDesktop property from KWin";
}
// 连接到 showingDesktopChanged 信号
kwin.connection().connect("org.kde.KWin", "/KWin", "org.kde.KWin",
"showingDesktopChanged", this, SLOT(onShowingDesktopChanged(bool)));
} else {
qWarning() << "Failed to connect to KWin D-Bus interface";
}
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, wjyrich The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
TAG Bot New tag: 2.0.0 |
|
TAG Bot New tag: 2.0.1 |
|
/forcemerge |
|
This pr force merged! (status: unknown) |
as title.
Logs:
Summary by Sourcery
Bug Fixes: